from sympy import *
from sympy.abc import x,y,z,a,b,c,m,n,p,q,r,s
f = Function('f')
import sys as __sys__mod
import traceback as __traceback__mod
if __name__ == '__main__':
    print("Python 3.7.2 便捷解释器|孙振兴|内置Sympy数学模块")
    if input('0:interactive\n1:run code.py\n') == "0":
        while 1:
            try:
                __text_input_code__ = input("->> ")
                if __text_input_code__ == "":
                    continue
                _ = eval(__text_input_code__)
                if not( _ == None):
                    print(_)
            except:
                try:
                    exec(__text_input_code__)
                except:
                    _0_exType,_0_exValue,_0_exTrace = __sys__mod.exc_info()
                    print(_0_exType,_0_exValue,sep="\n")
                    for __trace in __traceback__mod.extract_tb(_0_exTrace):
                        print(__trace)
    else:
        with open('code.py','r+') as _0_f:
            _0_code = _0_f.read()
            exec(_0_code)
